/** Represents an directed link in a graph between two nodes.
 * @param <LI> The type of information embedded within this link.
 * @param <NI> The type of information embedded within the node connected
 *           to this link.
 * @author Ian Helmke, Dan King
 */
class Link<LI, NI> implements ILink<LI, NI> {
  private final INode<NI, LI> dest;
  private final LI info;

  /** The Constructor.
   * @param dest The destination of this link.
   * @param info Specific information embedded within this link.
   */
  public Link(INode<NI, LI> dest, LI info) {
    this.dest = dest;
    this.info = info;
  }

  /** Gets the destination node of this link.
   * @return the node that is the destination of this link.
   */
  public INode<NI, LI> getDestination() {
    return this.dest;
  }

  /** Gets underlying information about this link.
      @return Information of the type specified during the
      construction of this link.
   */
  public LI getInfo() {
    return this.info;
  }
}
